package com.xiaozhichao.javaapi.base.type;

import org.junit.Test;

public class TypeTest {

    @Test
    public void shortTest(){

        short s1 = 1;
        System.out.println("before : " + s1);
        /*s1 = s1 + 1;*/ // 编译报错，需要强制转型
        s1 += 1; // 复合操作符，自动转型
        System.out.println("after : " + s1);
    }
}
